﻿using System;
using System.Collections.Generic;
using System.Text;
using Cwing.UI.Controls;
using System.ComponentModel;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Cwing.UI.Validation
{
    public interface IValidation
    {
        /// <summary>
        /// Use to specify the order of the validate
        /// </summary>
        Int32 Index
        {
            get;
            set;
        }

        /// <summary>
        /// Validation Configuration Node in ValidationConfiguration.xml file
        /// </summary>
        String Path
        {
            get;
            set;
        }

        /// <summary>
        /// Validate Control value
        /// </summary>
        /// <returns></returns>
        ValidationResult Validate();

        /// <summary>
        /// Validation Result
        /// </summary>
        ValidationResult ValidationResult
        {
            get;
            set;
        }

        /// <summary>
        /// 
        /// </summary>
        String ValidationSummary
        {
            get;
            set;
        }

        ErrorList ErrorMessageContainer
        {
            get;
        }

        Configuration ValidationConfiguration
        {
            get;
        }

        event ControlValidated Validated;

        event ControlValidating Validating;

        Boolean IsRendError
        {
            get;
            set;
        }

        Boolean IsValidate
        {
            get;
            set;
        }

        ValidationType ValidationType
        {
            get;
            set;
        }

        String GroupName { get; set; }

#if Full
        String ToClientScript();
#endif

        WebControl Self
        {
            get;
        }
    }
}
